var antiSpam = Ext.create('Ext.Container', {
	layout:'column',

    defaults:{
        border:false,
        frame: false,
        xtype:'container',
        bodyStyle: 'background-color:#E8E8E8;'
    },

    items:[
        {
            columnWidth: 0.34,
            items:[{
                height: 70,
                border:false,
                frame: false,
                bodyStyle: 'background-color:#E8E8E8;',
                html: '<div style="font-size: 12px; margin-top:18px;">Digite abaixo o código:</div>'
            }]
        },{
            // left column
            // defaults for fields
            columnWidth: 0.47,
            items:[{
                border:false,
                frame: false,
                bodyStyle: 'background-color:#E8E8E8;',
                width: 300,
                height: 54,
                html: '<div id="divAntiSpamImg" align="left" style="padding-left: 5px; margin-bottom:5px;"><img id="antiSpamImg" src="../server/lib/captcha" onclick="reloadImage()" /></div>'
            },{
                xtype: 'textfield',
                name: 'code',
                cls: 'txtCode',
                width: 172,
                emptyText: 'Digite aqui o código acima',
                allowBlank: false,
                selectOnFocus: true,
                enableKeyEvents: true,
            
                listeners: {
                    keyup: function(a, b) {
                        //Executa a chamada do submit
                        console.log("passou aqui xpto");
                        Ext.getCmp('windowLogin').teclaEnter(a, b);
                    },
                    change: function(field, newValue, oldValue){
                        field.setValue(newValue.toUpperCase());
                    }
                }
            }]
        },{
            // right column
            // defaults for fields
            columnWidth: 0.19,
            cls: 'refreshCaptcha',
            items:[{
                xtype: 'button',
                text: 'Trocar',
                iconCls: 'reload',
                handler: function(){
                    reloadImage();
                }
            }]
        }
    ]
});